from rest_framework import serializers
from myapp.models import *


class UserSer(serializers.ModelSerializer):
    class Meta:
        model = User
        fields = "__all__"


class NodeSer(serializers.ModelSerializer):
    class Meta:
        model = Node
        fields = "__all__"


class AccessSer(serializers.ModelSerializer):
    class Meta:
        model = Access
        fields = "__all__"


class AccessNewSer(serializers.ModelSerializer):
    node = NodeSer()

    class Meta:
        model = Access
        fields = "__all__"


class CateSer(serializers.ModelSerializer):
    class Meta:
        model = Cate
        fields = "__all__"
